package com.mbc.common.entities;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@SuppressWarnings("serial")
@Entity
@NamedQueries({
	@NamedQuery(name="Notification.findByUserId", query = "SELECT n FROM Notification n WHERE n.userId = :userId AND n.notified = :notified")
})
public class Notification implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;
	@Basic(optional=false)
	private Long userId;
	private String data;
	private Boolean notified;
	private byte type;

	public Notification(){
		clearProperties();
	}

	public void clearProperties(){
		userId = 0L;
		data = "";
		notified = false;

	}

	public Long getUserId(){
		return userId;
	}

	public void setUserId(Long userId){
		this.userId = userId;
	}

	public String getData(){
		return data;
	}

	public void setData(String data){
		this.data = data;
	}

	public Boolean getNotified(){
		return notified;
	}

	public void setNotified(Boolean notified){
		this.notified = notified;
	}

	public byte getType() {
		return type;
	}

	public void setType(byte type) {
		this.type = type;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


}
